package com.lepu.app.fun.chat.bean;

import org.json.JSONException;
import org.json.JSONObject;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

public class BeanDoctorOnline {
	public String DoctorID;
	public String DoctorName;
	
	/*
	 * 解析数据
	 */
	public static BeanDoctorOnline parseDetailInfo(String dataString)
	{
		String result = "";
		try {
			JSONObject jsonObject = new JSONObject(dataString);
			JSONObject obj1 = (JSONObject) jsonObject.get("Result");
			JSONObject obj2 = (JSONObject) obj1.get("DetailInfo");
			
			result = obj2.toString();
		} catch (JSONException e) {
			e.printStackTrace();
		}
		
		Gson gson = new Gson();
		BeanDoctorOnline item = gson.fromJson(result,
				new TypeToken<BeanDoctorOnline>() {
				}.getType());
		return item;
	}
}
